package com.bw.lyc.mvp.view.video;

import android.os.Bundle;

import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.bw.lyc.R;
import com.bw.lyc.mvp.view.video.adapter.VideoVpAdapter;
import com.flyco.tablayout.SlidingTabLayout;

import io.reactivex.annotations.NonNull;
import io.reactivex.annotations.Nullable;


public class VideoFragment extends Fragment {

    private View rootView;
    private SlidingTabLayout video_tab;
    private ViewPager video_vp;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        rootView = inflater.inflate(R.layout.fragment_video, container, false);
        init();
        return rootView;
    }

    private void init() {
        video_tab = rootView.findViewById(R.id.video_tab);
        video_vp = rootView.findViewById(R.id.video_vp);
        video_vp.setAdapter(new VideoVpAdapter(getFragmentManager()));
        video_tab.setViewPager(video_vp);
    }

}